package com.zzyl.controller.manager;

import com.zzyl.base.PageBean;
import com.zzyl.base.ResponseResult;
import com.zzyl.service.RefundRecordService;

import com.zzyl.vo.RefundRecordVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
public class RetreatBillController {
    @Autowired
    RefundRecordService refundRecordService;


    @PostMapping("/trade-common-feign/query-refund-record")
    public ResponseResult<PageBean<RefundRecordVo>> query(@RequestBody RefundRecordVo vo) {
        PageBean<RefundRecordVo> vo1 = refundRecordService.queryRefundRecord(vo);
        return ResponseResult.success(vo1);
    }

    @GetMapping("/trade-common-feign/query-refund")
    public ResponseResult<RefundRecordVo> query1(RefundRecordVo vo){
        vo.setRefundNo(vo.getRefundRecordNo());
        RefundRecordVo vo1 = refundRecordService.findByRefundNo(vo.getRefundNo());
        log.info("=================================================={}",vo);
        return ResponseResult.success(vo1);
    }
}
